Skip to content

[Feat] 산별 등산 기록 목록 API - 정상 인근 트래킹 사진 2장 응답 추가#166

Merged
pooreumjung merged 4 commits into
developfrom
feat/#165-hiking-record-summit-photos
May 30, 2026
Merged

[Feat] 산별 등산 기록 목록 API - 정상 인근 트래킹 사진 2장 응답 추가#166
pooreumjung merged 4 commits into
developfrom
feat/#165-hiking-record-summit-photos

Conversation

@pooreumjung

Copy link
Copy Markdown
Member

🧾 요약

  • /api/hiking-records/me/mountains 응답의 이미지를 산 기본 이미지 대신, 트래킹 중 촬영한 사진 중 정상 좌표 기준 가장 가까운 2장으로 변경

🔗 이슈

✨ 변경 내용

  • HikingRecordRepository SQL — LATERAL JOIN + ROW_NUMBER 피벗으로 tracking_photostracking_sessions 경유, ST_Distance 기준 정상 인근 사진 2장 조회
  • UserHikingMountainRecordProjectiongetImageUrl()getImageUrl1(), getImageUrl2()로 분리
  • GetUserHikingMountainRecordResponseimageUrl: StringimageUrls: List<String> (null/blank 필터링)
  • GetUserHikingMountainRecordResponseTest — 정상 매핑, blank 필터링, 사진 없는 케이스 검증 추가

✅ 확인

  • 빌드 OK
  • 테스트 OK

@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c4add157-a63e-45ff-8623-19f630f5ab8f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#165-hiking-record-summit-photos

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이번 변경은 사용자의 등산 기록 목록 조회 시 제공되는 시각적 정보를 개선하기 위한 것입니다. 기존의 산 기본 이미지 대신, 사용자가 실제 트래킹 중 정상 인근에서 촬영한 사진을 우선적으로 노출하여 사용자 경험을 향상시켰습니다. 이를 위해 데이터베이스 쿼리 구조를 조정하고 DTO 및 관련 테스트 코드를 업데이트하였습니다.

Highlights

  • API 응답 데이터 변경: 산별 등산 기록 목록 API 응답에서 산 기본 이미지 대신, 정상 좌표와 가장 가까운 트래킹 사진 2장을 포함하도록 변경했습니다.
  • 데이터베이스 쿼리 최적화: LATERAL JOIN과 ROW_NUMBER를 사용하여 정상 위치 기준 가장 가까운 사진을 효율적으로 조회하도록 쿼리를 개선했습니다.
  • DTO 및 프로젝션 수정: 이미지 URL 필드를 단일 문자열에서 리스트 형태로 변경하고, null 또는 빈 값을 필터링하는 로직을 추가했습니다.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@pooreumjung pooreumjung self-assigned this May 30, 2026
@pooreumjung pooreumjung added the enhancement New feature or request label May 30, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the user's hiking mountain record response to return up to two tracking photos instead of a single mountain image. The repository query was updated to fetch the two closest tracking photos using a lateral join and spatial distance sorting. The review feedback recommends optimizing the query's performance by casting the spatial coordinates to geometry instead of geography in the ST_Distance function, which reduces computational overhead while maintaining sufficient accuracy for sorting.

@pooreumjung
pooreumjung merged commit 9720874 into develop May 30, 2026
3 checks passed
@howooyeon
howooyeon deleted the feat/#165-hiking-record-summit-photos branch June 3, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] 산별 등산 기록 목록 API - 정상 인근 트래킹 사진 2장 응답 추가

1 participant